//
//  PayService.swift
//
//
//  Created by tank on 9/3/24.
//

import Foundation

class PayService: PayServiceProtocol {
    private let ipaService: IPAService = IPAService()
    
    @available(iOS 15.0, *)
    public func payVip(id: String) async throws {
        guard let product = await try ipaService.product(id: id) else {
            return
        }
        
        try await ipaService.purchase(product: product)
    }
}
